<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>插入节点</title>
</head>
<body>
  <div class="container"></div>
  <script>
      var container = document.querySelector('.container');
      var div = document.createElement('div');
      div.innerText = '我是创建出来的子节点';
      //父节点加入子节点
      container.appendChild(div);
  </script>
</body>
</html>